<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>
<style type="text/css">
.preview-pic{
    width: 143px;
    height: 228px;
}
.preview{
    width: 160px;
    float: left;
    border: 1px solid #ccc;
    margin-right: 10px;
    margin-bottom: 12px;
}  
.use-theme{
    color: green;
}  
</style>
<include file="Public:aside"/>

    <section>
        <include file="Public:nav" />
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">挂件</h4>
            </div>            
            <hr />
            <div >
                <volist name="volist" id="vo">
                    <div class="preview " >
                        <img class="preview-pic" src="{$vo.preview}">
                        <div >
                            <span>{$vo.title}</span>
                            <span>{$vo.author}</span>
                        </div>
                    </div>
                </volist>
            </div>
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="Public/js/app.js" />
<script type="text/javascript">
$(function(){
    $('.use-theme[theme={$appinfo.tpl}]').show();
    $('a.use').on('click',function(e){
        e.preventDefault();
        TukTuk.Modal.loading();
        var theme = $(this).attr('theme');
        var url = "{:U('Admin/Templates/useTheme')}";
        $.post(url,{theme:theme},function(resq){
            TukTuk.Modal.hide();
            $('.use-theme').hide();
            $('.use-theme[theme='+theme+']').show();
            $('.refresh-device').click();
        })
    })
})    
</script>
</html>
